#ifndef JPMASTER_H
#define JPMASTER_H

#include "jpsocket.h"
#include "jpdata.h"
#include "jpshowinfo.h"
#include "core/stsend.h"
#include <QObject>

class JpMaster : public JpSocket,public JpShowInfo
{
    Q_OBJECT
public:
    JpMaster(MastSlaveMap data);
    ~JpMaster();
    void run();
public slots:
    void JPWrite(const InMapData inmap,QTcpSocket *sk);
private:
    MastSlaveMap _info;
    QVector<ClientList> _clientlist;
    void saveClient(QTcpSocket *sk);
    STsend *st;

protected:
   virtual void serverConnectionLogic(QTcpSocket *sk);
   virtual void serverDisConnectionLogic(QTcpSocket *sk);
   virtual void readServerLogic(QTcpSocket* socket);

};

#endif // JPMASTER_H
